package com.hr.service;

import com.hr.entity.Employee;
import com.hr.mapper.EmployeeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName EmployeeServiceImpl
 * @Description TODO
 * @Author hkp
 **/

@Service
public class EmployeeServiceImpl implements EmployeeService{
    @Resource
    private EmployeeMapper employeeMapper;

    @Override
    public int addEmp(Employee employee) {
        return employeeMapper.addEmp(employee);
    }

    @Override
    public int delEmp(int id) {
        return employeeMapper.delEmp(id);
    }

    @Override
    public int updateEmp(Employee employee) {
        return employeeMapper.updateEmp(employee);
    }

    @Override
    public List<Employee> queryAllEmp() {
        return employeeMapper.queryAllEmp();
    }

    @Override
    public Employee queryEmp(int id) {
        return employeeMapper.queryEmp(id);
    }
}
